import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/css/reset.css'
import 'lib-flexible'
import {
  Icon, Tabbar, TabbarItem, Swipe, SwipeItem,
  Grid, GridItem, List, PullRefresh, NavBar,
  GoodsAction, GoodsActionIcon, GoodsActionButton, Popup,
  Card, Stepper, Button, Search, Form, Field, Toast, Checkbox,
  SwipeCell, SubmitBar, ContactCard, CellGroup, Cell, Switch,
  Area, AddressList, Lazyload
} from 'vant'
import $loading from './plugins/loading'
console.log(require('./assets/imgs/loading.jpg'))
Vue.use($loading)
Vue.use(Icon)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(List)
  .use(PullRefresh)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Button)
  .use(Search)
  .use(Form)
  .use(Field)
  .use(Toast)
  .use(Checkbox)
  .use(SwipeCell)
  .use(SubmitBar)
  .use(ContactCard)
  .use(Field)
  .use(CellGroup)
  .use(Cell)
  .use(Switch)
  .use(Area)
  .use(AddressList)
  .use(Lazyload, {
    loading: require('./assets/imgs/loading.jpg'),
    error: require('./assets/imgs/error.jpg'),
    preload: 1,
    attempt: 3
  })

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
